﻿<!doctype html>
<html class="no-js">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>用户详情</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
 
  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <link rel="stylesheet" href="assets/css/amazeui.min.css">
  <link rel="stylesheet" href="assets/css/user_login.css">
   
  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/amazeui.js"></script>
  <script src="assets/js/memu.js"></script>
  <script src="assets/js/PublicFunction.js"></script>	
  <script src="assets/js/baiduTemplate.js"></script>
 <script src="assets/js/user_login.js"></script>

  <style type="text/css">

	
	
  </style>
  
  
</head>
<body>



<div id="parent" >


	
	
	<div class="am-container" id="top_mig">
	
		<div id="portrait" >
			<img class="am-circle" id="portrait_img" src="http://s.amazeui.org/media/i/demos/bw-2014-06-19.jpg?imageView/1/w/1000/h/1000/q/80"/>
		</div>
	
	</div>
	
	<div id= "name"> <span id="userName">进口商<span></div>
	
<!-- 	<div class="am-g info" >
			<div class="am-u-sm-4">公司</div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7">BAIFU IMP&EXP LDTA</div>
	</div> -->
	<div class="am-g info" >
			<div class="am-u-sm-4">CNPJ</div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="cnpj">00.000.000/001-00</div>
	</div>
	<div class="am-g info" >
			<div class="am-u-sm-4">地址</div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="address">rua carlos de souza nazate 237</div>
	</div>
	<div class="am-g info" >
			<div class="am-u-sm-4">联系人  </div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="realName">潘先生</div>
	</div>
<!-- 	<div class="am-g info" >
			<div class="am-u-sm-4">固定号码   </div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7">11-33161543</div>
	</div> -->
	<div class="am-g info" >
			<div class="am-u-sm-4">手机号码  </div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="phonenumber">11-968378083</div>
	</div>
	<div class="am-g info" >
			<div class="am-u-sm-4">微信   </div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="wechat">505384953</div>
	</div>  
	<div class="am-g info" >
			<div class="am-u-sm-4">E-mail  </div>
			<div class="am-u-sm-1">:</div>
			<div class="am-u-sm-7" id="email">alibaba@hotmail.com</div>
	</div>  
	
	<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "id="">
		<ul class="am-navbar-nav am-cf am-avg-sm-1" style="width:100%; padding:0 0; ">
			<li style="background-color:#00abf0;">
			<a href="tel:123456789" class="warehouse">
				<!--span class="am-icon-phone"></span-->
				<span class="am-navbar-label">产品库</span>
			</a>
			</li>
			<li style="background-color:#66d99f;">
				<a href="java" class="attention">
					<!--span class="am-icon-share-square-o"></span-->
					<span class="am-navbar-label" id="at">加关注</span>
				</a>
			</li>
		</ul>
	</div>
	
</div>

<script type="text/javascript">
<!--页面初始化-->
function init(w,h) {
  setStyle(w,h);
  setTop_mig("assets/img/userback.png");
 	var username = getThisActivityParamate("username");
 	var username1 = getLoginUserName();
	var userJson = Public_method.getUserProfileByUserName(username);
	var data = strToJson(userJson);
	$("#userName").html(data.userName);
	$("#cnpj").html(data.cnpj);
	$("#address").html(data.address);
	$("#realName").html(data.realName);
	$("#phonenumber").html(data.phonenumber);
	$("#wechat").html(data.wechat);
	$("#email").html(data.email);
	var user_ioc =   Public_method.getServerPath()+"upload/user/"+data.userName+"top.jpg";
	//var user_ioc =   Public_method.getServerPath()+"upload/user/a284776538qtop.jpg";
	$("#portrait_img").attr("src",user_ioc);
	
	var href = "javascript:actuator('attention(\""+data.userName+"\")');";
	$(".attention").attr("href",href);
	href = "javascript:gotoMyProduct('"+data.userName+"');";
	$(".warehouse").attr("href",href);
	
	
	var byfollowList =data.byfollowList;
	
	for(var i = 0 ;byfollowList.length;i++){	
		if(byfollowList[i].userName == username1){
			$("#at").html("取消关注");			
			href = "javascript:actuator('cancelattention(\""+data.userName+"\")');";		
			$(".attention").attr("href",href);
			
			return;
		}
	}
	
	
	
  };
  
//关注用户
  function attention(username){
  	LoginFunction.attention(username);
  }
 //取消关注
  function cancelattention(username){
	
	  LoginFunction.cancelattention(username);
 }

//跳转供应商的产品库
  function gotoMyProduct(username){
 	 
 	 Public_method.gotoMyProduct(username);
  }
  

</script>
</body>
</html>
